﻿using System;
using DevPhoneToolkitSample.Data;
using Microsoft.Phone.Controls;

namespace DevPhoneToolkitSample.Samples
{
    public partial class DropDownControlTemplatesSample : PhoneApplicationPage
    {
        public DropDownControlTemplatesSample()
        {
            InitializeComponent();

            var datacbo1 = new string[] {"DataItem1", "DataItem2", "DataItem3", "DataItem4", "DataItem5"};
            Cbo1.ItemsSource = datacbo1;
            Cbo1.SelectedItem = "DataItem2";

            var datacbo2 = new ModelFruits[]
            {
                new ModelFruits{ Photo = new Uri("/Data/Fruits/apple_over.png", UriKind.Relative), Name = "Apple"},
                new ModelFruits{ Photo = new Uri("/Data/Fruits/bananas_over.png", UriKind.Relative), Name = "Banana"},
                new ModelFruits{ Photo = new Uri("/Data/Fruits/cherry_over.png", UriKind.Relative), Name = "Cherry"},
                new ModelFruits{ Photo = new Uri("/Data/Fruits/grapes_over.png", UriKind.Relative), Name = "Grape"},
                new ModelFruits{ Photo = new Uri("/Data/Fruits/pineapple_over.png", UriKind.Relative), Name = "Pineapple"},
                new ModelFruits{ Photo = new Uri("/Data/Fruits/strawberry_over.png", UriKind.Relative), Name = "Strawberry"},
            };
            Cbo2.ItemsSource = datacbo2;
            Cbo2.SelectedIndex = 2;

            Cbo3.ItemsSource = datacbo2;
            Cbo3.SelectedIndex = 2;

        }
    }
}